<?php

namespace app\index\validate;

use think\Validate;

class User extends Validate
{

	protected $rule = [
        'true_name'  =>'require|chs',
        'phone'  =>'require|mobile',
        'id_card' =>'require|idCard',
        'code' =>'require|between:1000,9999',
        '__token__' => 'require|token'
    ];

    protected $message = [
        'true_name.require' => '姓名名必填',
        'true_name.chs' => '姓名只能是汉字',
        'phone.require' => '手机号必填',
        'phone.mobile' => '手机号格式不正确',
        'id_card.require' => '身份证号必须',
        'id_card.idCard' => '身份证号格式不正确',
        'code.require' => '验证码不能为空',
        'code.between' => '验证码错误',
        '__token__.require'    => '表单令牌必须',
        '__token__.token'    => '表单令牌过期',
    ];

}
